//
//  YZMActivityModel.m
//  YZMicroStock
//
//  Created by apple on 17/5/10.
//  Copyright © 2017年 cqjr. All rights reserved.
//

#import "YZMActivityModel.h"

@implementation YZMActivityModel

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"bannerUrl": @"bannerUrl",
             @"activityId":@"id",
             @"name":@"name",
             };
}

- (void)setNilValueForKey:(NSString *)key{
    
}

-(NSURL *)imageUrl{
    
    return [NSURL URLWithString:[URL_BASE_STRING stringByAppendingString:[self.bannerUrl componentsSeparatedByString:@","][0]]];
}

- (NSDictionary *)activityUrl {
    NSArray *paramArray = [self.bannerUrl componentsSeparatedByString:@","];
    
    if (paramArray.count != 3) return nil;
    
    return @{@"imageUrl":paramArray[0], @"event":paramArray[1], @"url":paramArray[2]};
}

@end
